# -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.db import models


class UserRole(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)
    # 添加你的自定义字段
    role_admin = 'admin'
    role_user = 'user'
    MY_ENUM_CHOICES = [
        (role_admin, 'Display name for admin'),
        (role_user, 'Display name for user'),
    ]
    role = models.CharField(
        max_length=7,
        choices=MY_ENUM_CHOICES,
        default=role_user
    )
    jnumber = models.CharField(max_length=16)
    img = models.CharField(max_length=255)
    phone = models.CharField(max_length=11)
    gender = models.IntegerField(default=1)
    class Meta:
        db_table = 'airport_user'



